# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Jeff Horelick <jdhore1@gmail.com>
# Contributor: skydrome <skydrome@i2pmail.org>

pkgname=the_silver_searcher
pkgver=2.2.0
pkgrel=2
pkgdesc='Code searching tool similar to Ack, but faster'
arch=('loong64' 'x86_64')
url='https://github.com/ggreer/the_silver_searcher'
license=('Apache')
depends=('pcre' 'xz')
makedepends=('git')
source=("git+https://github.com/ggreer/$pkgname.git#tag=$pkgver")
md5sums=('SKIP')

prepare() {
  sed -i 's,configure,configure --prefix=/usr,' $pkgname/build.sh
}

build() {
  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
  ./$pkgname/build.sh
}

package() {
  make -C $pkgname DESTDIR="$pkgdir" install
}

# getver: github.com/ggreer/the_silver_searcher
# vim: ts=2 sw=2 et:
